package com.designpatterns.chainofresponsibilitypattern;

public class TestMyInterceptor {
    public static void main(String[] args) {
        HelloWorld helloWorld = new HelloWorldImpl();
        HelloWorld helloWorldProxy1 = InterceptorJDKProxy.getProxy(helloWorld,MyInterceptor1.class);
        HelloWorld helloWorldProxy2 = InterceptorJDKProxy.getProxy(helloWorldProxy1,MyInterceptor2.class);
        HelloWorld helloWorldProxy3 = InterceptorJDKProxy.getProxy(helloWorldProxy2,MyInterceptor3.class);
        helloWorldProxy3.sayHello();
    }
}
